import request from '@/utils/request'

// 查询订单表头列表
export function listOrderhead(query) {
  return request({
    url: '/store/orderhead/list?orderStatus='+query.orderStatus,
    method: 'get',
    // params: query
  })
}

// 查询订单表头详细
export function getOrderhead(orderSerial) {
  return request({
    url: '/store/orderhead/' + orderSerial,
    method: 'get'
  })
}

// 新增订单表头
export function addOrderhead(data) {
  return request({
    url: '/store/orderhead',
    method: 'post',
    data: data
  })
}

// 修改订单表头
export function updateOrderhead(data) {
  return request({
    url: '/store/orderhead',
    method: 'put',
    data: data
  })
}

// 删除订单表头
export function delOrderhead(orderSerial) {
  return request({
    url: '/store/orderhead/' + orderSerial,
    method: 'delete'
  })
}

// 全部订单
export function getOrderheadList(query) {
  return request({
    url: '/store/orderhead/listAll',
    method: 'get',
    params: query
  })
}
// 商品发货接口
// http://localhost/dev-api/store/ems/list?pageNum=1&pageSize=10
export function getShopemsList(query) {
  return request({
    url: '/store/ems/list',
    method: 'get',
    params: query
  })
}

// 商品发货详情

// http://localhost/dev-api/store/ems/list?orderSerial=
export function getEmsListDetails(query) {
  return request({
    url: '/store/ems/list',
    method: 'get',
    params: query
  })
}

// /store/ems/APP/V1/emsList
export function getemsList() {
  return request({
    url: '/store/ems/APP/V1/emsList',
    method: 'get'
  })
}

// /dev-api/store/ems/editList
export function geteditList(data) {
  return request({
    url: '/store/ems/editList',
    method: 'post',
    data: data
  })
}

// 退单查询   http://localhost/dev-api/store/orderhead/backOrder/listAll
export function getBackOrderList(data) {
  return request({
    url: '/store/orderhead/backOrder/listAll',
    method: 'get',
    params: data
  })
}


// http://localhost/dev-api/store/orderhead/editStatus
// 退单审核
export function getBackEditStatusNew(data) {
  return request({
    url: '/store/orderhead/editStatus/V1.2',
    // url: '/store/orderhead/editStatus',
    method: 'put',
    data: data
  })
}

// http://localhost/dev-api/store/ems/emsPrice
export function getEmsJdPrice(data) {
  return request({
    url: '/store/ems/emsPrice',
    method: 'post',
    data: data
  })
}

// 订单销售额统计
export function getStatsOrderSalesAmount() {
  return request({
    url: '/store/orderhead/statsOrderSalesAmount',
    method: 'get'
  })
}